package com.seal.tsms.school.service;

import com.seal.tsms.base.dao.BaseDao;
import com.seal.tsms.base.service.AbstractBaseService;
import com.seal.tsms.school.entity.StudentRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 创建学员档案service层的实现类
 * Created by zhaishuai on 2016/1/20.
 */
@Service
@Transactional
public class StudentRecordServiceImpl  extends AbstractBaseService<StudentRecord,String> implements StudentRecordService{
    @Qualifier("studentRecordDaoImpl")
    @Autowired
    @Override
    public void setSelfDao(BaseDao<StudentRecord, String> selfDao) {
        super.setSelfDao(selfDao);
    }

    public void saveList(List<StudentRecord> list) {
        for (StudentRecord sr:list
             ) {
            this.save(sr);
        }
    }
}
